-- GENERATED SPELL FOR [Bloodwarder Greenkeeper] --


function spell0_18419(pUnit, Event) --@Greenkeeper\'s Fury,n/a--
pUnit:FullCastSpellOnTarget(34798,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18419', 2000, 1)
end

function spell1_18419(pUnit, Event) --@Greenkeeper\'s Fury,n/a--
pUnit:FullCastSpellOnTarget(39121,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18419', 2000, 1)
end

function spell2_18419(pUnit, Event) --@Impending Coma,n/a--
pUnit:FullCastSpellOnTarget(34800,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18419', 8318, 1)
end

function spell3_18419(pUnit, Event) --@Nature Shock,n/a--
pUnit:FullCastSpellOnTarget(34797,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18419', 6274, 1)
end

function spell4_18419(pUnit, Event) --@Nature Shock,n/a--
pUnit:FullCastSpellOnTarget(39120,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18419', 6280, 1)
end

function Sorts_18419(pUnit, Event)
local choix_sorts_18419 = math.random(0, 4)
if choix_sorts_18419 == 0 then
pUnit:RegisterEvent('spell0_18419', 1, 1)
end
if choix_sorts_18419 == 1 then
pUnit:RegisterEvent('spell1_18419', 1, 1)
end
if choix_sorts_18419 == 2 then
pUnit:RegisterEvent('spell2_18419', 1, 1)
end
if choix_sorts_18419 == 3 then
pUnit:RegisterEvent('spell3_18419', 1, 1)
end
if choix_sorts_18419 == 4 then
pUnit:RegisterEvent('spell4_18419', 1, 1)
end
end

function mob18419_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18419', math.random(1500, 3000), 1)
end

function mob18419_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18419_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18419_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18419, 1, 'mob18419_Action')
RegisterUnitEvent(18419, 2, 'mob18419_Leave')
RegisterUnitEvent(18419, 3, 'mob18419_Kill')
RegisterUnitEvent(18419, 4, 'mob18419_Die')
